import { IMessageBase } from "../../Framework/MQ/IMessageBase";
import { MessageManager } from "../../Framework/MQ/MessageManager";
import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
import { SeqPlayerScoreHelper } from "./SeqPlayerScoreHelper";
import { SBattlefieldScore } from "./SBattlefieldScore";
import { SPlayerScore } from "./SPlayerScore";
type int = number;
//class SBattlefieldPlayerScores
// did
export class SBattlefieldPlayerScores extends IMessageBase {
  constructor(autoreg = false) {
    
    super();if (autoreg) {
      MessageManager.instance().regist(this);
    }
    return;
  }

  public /* override */ getType(): int {
    return this._type;
  }

  public /* override */ clone(): IMessageBase {
    return new SBattlefieldPlayerScores();
  }

  public /* override */ __write(arg1: SerializeStream): void {
    this.campScore.__write(arg1);
    SeqPlayerScoreHelper.write(arg1, this.scoreCamp1);
    SeqPlayerScoreHelper.write(arg1, this.scoreCamp2);
    SeqPlayerScoreHelper.write(arg1, this.scoreCamp3);
    return;
  }

  public /* override */ __read(arg1: SerializeStream): void {
    this.campScore = new SBattlefieldScore();
    this.campScore.__read(arg1);
    this.scoreCamp1 = SeqPlayerScoreHelper.read(arg1);
    this.scoreCamp2 = SeqPlayerScoreHelper.read(arg1);
    this.scoreCamp3 = SeqPlayerScoreHelper.read(arg1);
    return;
  }

  public /* const */ _type: int = 96;

  public /* var */ campScore!: SBattlefieldScore;

  public /* var */ scoreCamp1!: Array<SPlayerScore>;

  public /* var */ scoreCamp2!: Array<SPlayerScore>;

  public /* var */ scoreCamp3!: Array<SPlayerScore>;

  public static /* var */ _regist: SBattlefieldPlayerScores = new SBattlefieldPlayerScores(
    true
  );
}
